<%@include file="/WEB-INF/templates/configuration.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<style>

</style>

<h2>Test Score</h2>
<hr/>
<c:choose>
    <c:when test="${amounttests != 0}">
        <!-- Wanneer er gebruikers opgeslagen zijn, worden ze hier getoond -->
        <table class="zebra test-score">
            <tr>
                <td style="width:100px"> 
                    <strong>Test Name:</strong>
                </td>
                <td style="width:600px"> 
                    ${testscore.pk.test.testname}
                </td>
            </tr>

            <c:choose>
                <c:when test="${testscore.completed == 1}">
                    <tr class="test-completed">
                        <td style="width:100px">
                            <strong>Completed:</strong>
                        </td>
                        <td style="width:100px">
                        </td>
                    </tr>

                </c:when>
                <c:otherwise>
                    <tr class="test-failed">
                        <td style="width:100px">
                            <strong>Completed:</strong>
                        </td>
                        <td style="width:100px">
                        </td>
                    </tr>
                </c:otherwise>
            </c:choose>


            <tr>
                <td style="width:100px">
                    <strong>Score:</strong>
                </td>
                <td style="width:100px"> 
                    ${testscore.score}%
                </td>
            </tr>
        </table>
    </c:when>
    <c:otherwise>
        <!-- Als er geen cursussen zijn, wordt deze melding getoond -->
        There are no tests found.
    </c:otherwise>
</c:choose>

<p>
    <a class="button" href="${url}chapter/test?chapterid=${testscore.pk.test.chapter.chapterid}">Back to Tests</a>
    <a class="button" href="${url}chapter/view?chapterid=${testscore.pk.test.chapter.chapterid}">Back to Chapter</a>
</p>